﻿namespace Grow.ObjectMapper
{
    public interface IObjectMapper
    {
        /// <summary>
        /// 映射为新对象
        /// </summary>
        /// <typeparam name="TSource"></typeparam>
        /// <typeparam name="TResult"></typeparam>
        /// <param name="source"></param>
        /// <returns></returns>
        TResult Map<TSource, TResult>(TSource source);
        /// <summary>
        /// 在目标对象基础上进行映射
        /// </summary>
        /// <typeparam name="TSource"></typeparam>
        /// <typeparam name="TResult"></typeparam>
        /// <param name="source"></param>
        /// <param name="result"></param>
        /// <returns></returns>
        TResult Map<TSource, TResult>(TSource source, TResult result);

    }
}